import Layout from '@/layout/index'
const PureRouterView = {
  render(h) {
    return h('router-view')
  }
}

export default [
  {
    path: '/goodsCenter',
    name: 'goodsCenter',
    component: Layout,
    meta: { title: '商品管理', icon: 'menu-goodsCenter', menuId: 10, showIndex: 10 },
    children: [
      {
        path: 'goodsSetting',
        name: 'goodsSetting',
        component: () => import('@/views/goodsCenter/goodsSetting/index'),
        meta: { title: '商品列表', menuId: 1001, showIndex: 1 }
      },
      {
        path: 'priceManage',
        name: 'priceManage',
        component: PureRouterView,
        meta: { title: '商品价格管理', menuId: 1002, showIndex: 2 },
        children: [
          {
            path: 'priceMarket',
            name: 'priceMarket',
            component: () => import('@/views/goodsCenter/priceManage/marketPriceManage/index'),
            meta: { title: '市场价格', menuId: 100201, showIndex: 1, activeMenu: '/goodsCenter/priceManage/priceMarket' }
          },
          {
            path: 'areaPriceManage',
            name: 'areaPriceManage',
            component: () => import('@/views/goodsCenter/priceManage/areaPriceManage/index'),
            meta: { title: '区域价格', menuId: 100202, showIndex: 2, activeMenu: '/goodsCenter/priceManage/priceMarket' }
          },
          {
            path: 'specialOrientedMode',
            name: 'specialOrientedMode',
            component: () => import('@/views/goodsCenter/specialOrientedMode/index'),
            meta: { title: '特价管理', menuId: 100203, showIndex: 3, activeMenu: '/goodsCenter/priceManage/priceMarket' }
          },
          {
            path: 'preferentialPackage',
            name: 'preferentialPackage',
            component: () => import('@/views/goodsCenter/preferentialPackage/index'),
            meta: { title: '优惠套餐', menuId: 100204, showIndex: 4, activeMenu: '/goodsCenter/priceManage/priceMarket' }
          }
          // {  隐藏
          //   path: 'specialPriceManage',
          //   name: 'specialPriceManage',
          //   component: () => import('@/views/goodsCenter/priceManage/specialPriceManage/index'),
          //   meta: { title: '特别价格', menuId: 100205, showIndex: 5, activeMenu: '/goodsCenter/priceManage/priceMarket' }
          // }
        ]
      },
      {
        path: 'goodsCostSetting',
        name: 'goodsCostSetting',
        component: () => import('@/views/goodsCenter/goodsCostSetting/index'),
        meta: { title: '商品附属费用', menuId: 1003, showIndex: 3 }
      }
    ]
    // 原菜单
    // children: [
    //   {
    //     path: 'goodsSetting',
    //     name: 'goodsSetting',
    //     component: () => import('@/views/goodsCenter/goodsSetting/index'),
    //     meta: { title: '商品列表', menuId: 701, showIndex: 1 }
    //   },
    //   {
    //     path: 'priceManage',
    //     name: 'priceManage',
    //     component: () => import('@/views/goodsCenter/priceManage/index'),
    //     meta: { title: '商品价格管理', menuId: 702, showIndex: 2 }
    //   },
    //   {
    //     path: 'specialOrientedMode',
    //     name: 'specialOrientedMode',
    //     component: () => import('@/views/goodsCenter/specialOrientedMode/index'),
    //     meta: { title: '特价导向模式', menuId: 703, showIndex: 3 }
    //   },
    //   {
    //     path: 'goodsCostSetting',
    //     name: 'goodsCostSetting',
    //     component: () => import('@/views/goodsCenter/goodsCostSetting/index'),
    //     meta: { title: '商品费用设置', menuId: 704, showIndex: 4 }
    //   },
    //   {
    //     path: 'preferentialPackage',
    //     name: 'preferentialPackage',
    //     component: () => import('@/views/goodsCenter/preferentialPackage/index'),
    //     meta: { title: '优惠套餐', menuId: 705, showIndex: 5 }
    //   },
    //   {
    //     path: 'specialPriceManage',
    //     name: 'specialPriceManage',
    //     component: () => import('@/views/goodsCenter/priceManage/specialPriceManage/index'),
    //     meta: { title: '特别价格', menuId: 706, showIndex: 6 }
    //   }
    //   // {
    //   //   path: 'scoreRuleSetting',
    //   //   name: 'scoreRuleSetting',
    //   //   component: () => import('@/views/goodsCenter/scoreRuleSetting/index'),
    //   //   meta: { title: '积分规则配置', menuId: 20106, showIndex: 5 }
    //   // }
    // ]
  }
]
